package com.geologyoa.servlet;

import java.io.IOException;
import java.io.PrintWriter;

import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import com.geologyoa.domain.Dwzz01;
import com.geologyoa.domain.Wpdj01;
import com.geologyoa.service.SystemManager;
import com.geologyoa.service.SystemManagerImpl;

public class UpdateWpdj01Servlet extends HttpServlet {

	public void doGet(HttpServletRequest request, HttpServletResponse response)
			throws ServletException, IOException {
       doPost(request,response);
	}

	public void doPost(HttpServletRequest request, HttpServletResponse response)
			throws ServletException, IOException {
		SystemManager sys=new SystemManagerImpl();
		response.setContentType("text/xml;charset=utf-8");
		Wpdj01 wpdj01=new Wpdj01();
		String WPDJ0101=request.getParameter("WPDJ0101");
		String WPDJ0102=request.getParameter("WPDJ0102");
		String WPDJ0103=request.getParameter("WPDJ0103");
		String WPDJ0104=request.getParameter("WPDJ0104");
		String WPDJ0105=request.getParameter("WPDJ0105");
		//String WPDJ0106=request.getParameter("WPDJ0106");
		String WPDJ0107=request.getParameter("WPDJ0107");
		String WPDJ0108=request.getParameter("WPDJ0108"); 
		//Double WPDJ0109=Double.valueOf(request.getParameter("WPDJ0109")==""?"0":request.getParameter("WPDJ0109")).doubleValue();
		Double WPDJ0109=Double.valueOf(request.getParameter("WPDJ0109")==""?"0":request.getParameter("WPDJ0109")).doubleValue(); 
		Double WPDJ0110=Double.valueOf(request.getParameter("WPDJ0110")==""?"0":request.getParameter("WPDJ0110")).doubleValue(); 
		String WPDJ0111=request.getParameter("WPDJ0111");
		String WPDJ0112=request.getParameter("WPDJ0112"); 
		Double WPDJ0113=Double.valueOf(request.getParameter("WPDJ0113")==""?"0":request.getParameter("WPDJ0113")).doubleValue();;
		String WPDJ0114=request.getParameter("WPDJ0114");
		String WPDJ0115=request.getParameter("WPDJ0115");
		String WPDJ0116=request.getParameter("WPDJ0116");
		//String WPDJ0117=request.getParameter("WPDJ0117");
		//String WPDJ0118=request.getParameter("WPDJ0118");
		String WPDJ0119=request.getParameter("WPDJ0119");
		String WPDJ0120=request.getParameter("WPDJ0120");
		String WPDJ0121=request.getParameter("WPDJ0121");
		String WPDJ0122=request.getParameter("WPDJ0122");
		//String WPDJ0123=request.getParameter("WPDJ0123");
		//String WPDJ0124=request.getParameter("WPDJ0124");
		//String WPDJ0125=request.getParameter("WPDJ0125");
		String WPDJ0126=request.getParameter("WPDJ0126");
		String WPDJ0127=request.getParameter("WPDJ0127");
		String WPDJ0128=request.getParameter("WPDJ0128");
		String WPDJ0129=request.getParameter("WPDJ0129");
		String WPDJ0130=request.getParameter("WPDJ0130");
		String WPDJ0131=request.getParameter("WPDJ0131");
		Double WPDJ0132=Double.valueOf(request.getParameter("WPDJ0132").equals("")?"0":request.getParameter("WPDJ0132")).doubleValue();;
		Double WPDJ0133=Double.valueOf(request.getParameter("WPDJ0133").equals("")?"0":request.getParameter("WPDJ0133")).doubleValue();;
		String WPDJ0134=request.getParameter("WPDJ0134");
		wpdj01.setWpdj0101(Integer.parseInt(WPDJ0101));
		wpdj01.setWpdj0102(WPDJ0102);
		wpdj01.setWpdj0103(WPDJ0103);
		wpdj01.setWpdj0104(WPDJ0104);
		wpdj01.setWpdj0105(WPDJ0105);
		//wpdj01.setWpdj0106(WPDJ0106);
		wpdj01.setWpdj0107(WPDJ0107);
		wpdj01.setWpdj0108(WPDJ0108);
		wpdj01.setWpdj0109(WPDJ0109);
		wpdj01.setWpdj0110(WPDJ0110);
		wpdj01.setWpdj0111(WPDJ0111);
		wpdj01.setWpdj0112(WPDJ0112);
		wpdj01.setWpdj0113(WPDJ0113);
		wpdj01.setWpdj0114(WPDJ0114);
		wpdj01.setWpdj0115(WPDJ0115);
		wpdj01.setWpdj0116(WPDJ0116);
		//wpdj01.setWpdj0117(WPDJ0117);
		//wpdj01.setWpdj0118(WPDJ0118);
		wpdj01.setWpdj0119(WPDJ0119);
		wpdj01.setWpdj0120(WPDJ0120);
		wpdj01.setWpdj0121(WPDJ0121);
		wpdj01.setWpdj0122(WPDJ0122);
		//wpdj01.setWpdj0123(WPDJ0123);
		//wpdj01.setWpdj0124(WPDJ0124);
		//wpdj01.setWpdj0125(WPDJ0125);
		wpdj01.setWpdj0126(WPDJ0126);
		wpdj01.setWpdj0127(WPDJ0127);
		wpdj01.setWpdj0128(WPDJ0128);
		wpdj01.setWpdj0129(WPDJ0129);
		wpdj01.setWpdj0130(WPDJ0130);
		wpdj01.setWpdj0131(WPDJ0131);
		wpdj01.setWpdj0132(WPDJ0132);
		wpdj01.setWpdj0133(WPDJ0133);
		wpdj01.setWpdj0134(WPDJ0134);
		String path = "";
		if(WPDJ0134!=null&&!WPDJ0134.equals(""))
			path = request.getSession().getServletContext().getRealPath("/")+WPDJ0134;
		wpdj01.setRealPath(path);
   		boolean flag=sys.UpdateWpdj(wpdj01);
		if(flag==true)
		{
			response.getWriter().write("true");
		}else{
			response.getWriter().write("false");
		}
	}

}
